package com.huli.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.huli.domain.Orders;
import com.huli.dto.PayOrdersDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OrdersMapper  extends BaseMapper<Orders> {

    //查询车库所有已支付订单
    @Select("SELECT \tcarport.garage_id,orders.* FROM orders,carport,garage WHERE\n" +
            "\torders.carport_id = carport.carport_id AND\n" +
            "\tcarport.garage_id = garage.garage_id AND\n" +
            "\torders_status=1 AND\n" +
            "\tcarport.garage_id=#{garageId}")
    public List<PayOrdersDto> selectAllPayOrders(int garageId);

    //查询车库订单详情

}
